Ccay.Module.define("Ccay.example.demoImport",function(page,$S){
	/**
	 * Grid初始化
	 */
	page.ready=function(){
		$("#demoImport").ccayTab();
		var gridOptions={
			columns:[
			 {id: '' ,isCheckColumn : true,frozen:true,align:"center"},
			 {id: 'name' ,header:"ccay.demoImport.label.name",editable:false},
			 {id: 'displayName' ,header:"ccay.demoImport.label.displayname"},
		     {id: 'language' , header: "ccay.demoImport.label.language",align:"center", width:60,hidden:true},
		     {id: 'description' , header:"ccay.demoImport.label.description"}
			],
			operation : {
				search : {
					btn : '#btnSearch',
					panel : '#demoImportForm',
					url : 'services/ccay/example/demoImport/list/page/{0}/{1}'
				}
			}
	  }
	  $S("#demoImportGrid").ccayGrid(gridOptions);
	};
	
	page.DemoImport = function() {
		var param = {
			uploadType : "ExcelImport",
			completeCallback : Ccay.Component.Excel.uploadCallback,
			closeDialog : true,
			query : "excelType=ccay.example",
			maxFileCount : 1
		};
		Ccay.Component.openUploadDialog($i18n("ccay.common.button.import"), param);
	}
	page.demoExport = function() {
		if (!$S("#demoImportForm").valid())
			return;
		Ccay.doGet("services/ccay/example/demoExport/list/export",
		$S("#demoImportForm").jsonData(), function() {
		Ccay.Component.Excel.exportCallback();
		});
	}
});